package com.zritc.panshi.service.impl;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.zritc.panshi.entity.User;
import com.zritc.panshi.mapper.UserMapper;
import com.zritc.panshi.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	
	@Resource(mappedName = "com.zritc.panshi.mapper.UserMapper")
	private UserMapper userMapper;
	
	@Override
	public User getUserById(int userId) {
		return userMapper.selectByPrimaryKey(userId);
	}
	
	@Override
	public boolean addUser(User record) {
		userMapper.insertSelective(record);
		return true;
	}
}
